<?php $this->header(); ?>
<div class="wrap">
    <div class="nav">
        <div class="return"><a href="/?g=Admin&m=Slideshow&a=index">返回上一级</a></div>
        <ul class="cc">
            <li class="current"><a href="/?g=Admin&m=<?php echo MODULE; ?>&a=pictrue&slideshow_type_id=<?php echo $_GET['slideshow_type_id']; ?>">图片列表</a></li>
        </ul>
    </div>

    <?php if (MODULE != 'Page'): ?>
        <div class="mb10"><a class="btn" href="/?g=Admin&m=<?php echo MODULE; ?>&a=pictrueAdd&slideshow_type_id=<?php echo $_GET['slideshow_type_id']; ?>" title="添加图片" role="button"><span class="add"></span>添加图片</a></div>
    <?php endif; ?>
    <form action="<?php echo $func->url(GROUP . '-' . MODULE . '-listsort'); ?>" method="post">
        <?php if (!empty($list)): ?>
            <div class="table_list">
                <table width="100%">
                    <thead>
                        <tr>
                            <td>排序</td>
                            <td>ID</td>
                            <td>图片名称</td>
                            <td>预览</td>
                            <td>外链地址</td>
                            <td>操作</td>
                        </tr>
                    </thead>
                    <?php foreach ($list as $key => $value): ?>
                        <tr>
                            <td><input class="input length_0" type="text" name="listsort[<?php echo $value['slideshow_id']; ?>]" value="<?php echo $value['listsort']; ?>" /></td>
                            <td><?php echo $value['slideshow_id']; ?></td>
                            <td><?php echo $value['slideshow_name']; ?></td>
                            <td><a href="<?php echo $value['slideshow_pic']; ?>" target="_blank"><img src="<?php echo $value['slideshow_pic']; ?>" width="250" /></a></td>
                            <td><a href="<?php echo $value['slideshow_link']; ?>" target="_blank">查看</a></td>
                            <td>
                                <a href="<?php echo '/?g=Admin&m=' . MODULE . '&a=pictrueEdit&slideshow_type_id=' . $value['slideshow_type_id'] . '&id=' . $value['slideshow_id']; ?>" class="btn btn_submit J_ajax_submit_btn" >编辑</a>
                                <a href="<?php echo '/?g=Admin&m=' . MODULE . '&a=pictrueDelete&slideshow_type_id=' . $value['slideshow_type_id'] . '&id=' . $value['slideshow_id']; ?>" class="btn btn_submit J_ajax_submit_btn" onclick="return deleteWarning(this)">删除</a>
                            </td>
                        </tr>
                    <?php endforeach; ?>
                </table>
            </div>
            <?php echo $page; ?>
        <?php else: ?>
            <div class="not_content_mini"><i></i>亲！没内容！</div>
        <?php endif; ?>
        <div class="btn_wrap">
            <div class="btn_wrap_pd">
                <button type="submit" class="btn btn_submit J_ajax_submit_btn">排序</button>
            </div>
        </div>
    </form>

</div>
<?php $this->footer(); ?>